<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<form action="index.php" name="adminForm" method="post">
<?php
if(count($this->aDatos)>0){
	$i=0;
?>
	<div id="editcell">
	<table border="1" align="center" class="adminlist"><thead><tr>
	<th width="5">#</th>
	<th width="20"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo $this->total ?>);" /></th>
	<th><?php echo JText::_('Id Menu')?></th>
	<th><?php echo JText::_('Id del padre')?></th>
	<th><?php echo JText::_('Descripcion')?></th>

	<th>EDITAR</th>
	<th>BORRAR</th>	
	</tr>
	</thead>
	<?php foreach($this->aDatos as $renglon){	?>
		<tr>
		<td align="center"><?php echo $this->pagination->getRowOffset($i)?></td>
		<td><input type="checkbox" name="cid[]" id="cb<?php echo $i++?>" value="<?php echo $renglon->id?>" onclick="isChecked(this.checked)";/></td>
		<td align="center"><?php echo $renglon->id ?></td>
	<td align="center"><?php echo $renglon->parentid ?></td>
	<td align="center"><?php echo $renglon->description ?></td>

		<td align="center"><a href="javascript:editar('<?php echo $renglon->id ?>');">editar</a></td>
		<td align="center"><a href="javascript:borrar('<?php echo $renglon->id ?>');">borrar</a></td>
		<tr>
	<?php }?>
	 <tfoot>
	  <tr>
		 <td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td>
	  </tr>
	 </tfoot>

	</table>
	</div>
<?php } else {
	echo '<p align="center">'.JText::_( 'NO_RECORDS_FOUNDS' ).'</p><br/>';
	 } ?>
<input type="hidden" name="option" value="com_linio">
<input type="hidden" name="controller" value="liniomenu">
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="task">
<input type="hidden" name="id">
<?php echo JHTML::_( 'form.token' ); // security to prevent XSS as CSRF(Cross Site Request Forgery). ?>
</form>
